var userName=process.argv[2];
var pwd=process.argv[3];
var str="userName:"+ userName+" pwd:"+ pwd;

var buf1=Buffer.from(str);//默认utf-8的编码方式
var str1=buf1.toString("base64");//向字符串转换时，用base64编码，相当于加密密码
console.log(str1);//dXNlck5hbWU6emhhbmdzYW5wd2Q6MTIz